#pragma once
#include "CXcpObjectBase.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"
#include "NoBaseClass.h"
#include "CCachedSitePermission.h"

class CPermissionEnumerator :
	public CXcpObjectBase<NoBaseClass,CXcpObjectThreadSafeAddRefPolicy>
{

public: 
	static HRESULT Create(struct IPALSettingsDictionaryNode *, xvector<xref_ptr<CCachedSitePermission> > *, CPermissionEnumerator * *);
	HRESULT GetNext(CXString * *, enum Permission::Value *);

protected: 
	CPermissionEnumerator();
	virtual ~CPermissionEnumerator();
	HRESULT Initialize(struct IPALSettingsDictionaryNode *, xvector<xref_ptr<CCachedSitePermission> > *);
	xvector<xref_ptr<CCachedSitePermission> > m_CachedPermissions;


	xvector<xref_ptr<CCachedSitePermission>>::iterator m_CachedPermissionIterator;

	struct IPALSettingsNodeEnumerator * m_SettingsEnumerator;
};